﻿Namespace Facebook.Common

    ''' <summary>
    ''' Parametros de configuracion del control Activity Feed
    ''' </summary>
    ''' <remarks></remarks>
    Public Class ActivityFeedSettings
        Public Property Site As String = ""
        Public Property Width As String = "300"
        Public Property Height As String = "300"
        Public Property Header As Boolean = True
        Public Property Recommendations As Boolean = False

        Public Function GetHeader() As String
            Return IIf(Header = True, "true", "false")
        End Function

        Public Function GetRecommendations() As String
            Return IIf(Recommendations = True, "true", "false")
        End Function
    End Class

    ''' <summary>
    ''' Parametros de configuracion del control Recommendations
    ''' </summary>
    ''' <remarks></remarks>
    Public Class RecommendationsSettings
        Public Property Site As String = ""
        Public Property Width As String = "300"
        Public Property Height As String = "300"
        Public Property Header As Boolean = True

        Public Function GetHeader() As String
            Return IIf(Header = True, "true", "false")
        End Function

    End Class

    ''' <summary>
    ''' Parametros de configuracion del control Comments
    ''' </summary>
    ''' <remarks></remarks>
    Public Class CommentsSettings
        Public Property HRef As String = ""
        Public Property NumPosts As Integer = 2
        Public Property Width As String = ""
    End Class

    ''' <summary>
    ''' Parametros de configuracion del control Send
    ''' </summary>
    ''' <remarks></remarks>
    Public Class SendSettings
        Public Property HRef As String = ""
    End Class

    ''' <summary>
    ''' Parametros de configuracion del control Suscribe
    ''' </summary>
    ''' <remarks></remarks>
    Public Class SuscribeSettings
        Public Property HRef As String = ""
        Public Property ShowFaces As Boolean = True
        Public Property Width As String = "450"

        Public Function GetShowFaces() As String
            Return IIf(ShowFaces = True, "true", "false")
        End Function
    End Class

    ''' <summary>
    ''' Parametros de configuracion del  control LikeBox
    ''' </summary>
    ''' <remarks></remarks>
    Public Class LikeBoxSettings
        Public Property HRef As String = ""
        Public Property Width As Integer = 300
        Public Property Height As Integer = 556
        Public Property ColorScheme As PluginColorSchemes = PluginColorSchemes.Light
        Public Property ShowFaces As Boolean = True
        Public Property ShowStream As Boolean = True
        Public Property ShowHeader As Boolean = True
        Public Property BorderColor As System.Drawing.Color = Drawing.Color.White
        Public Property ForceWall As Boolean = False

        Public Function GetFaces() As String
            Return IIf(ShowFaces = True, "true", "false")
        End Function

        Public Function GetStream() As String
            Return IIf(ShowStream = True, "true", "false")
        End Function

        Public Function GetHeader() As String
            Return IIf(ShowHeader = True, "true", "false")
        End Function

        Public Function GetForceWall() As String
            Return IIf(ForceWall = True, "true", "false")
        End Function

        Public Function GetHtmlBorderColor() As String
            Return System.Drawing.ColorTranslator.ToHtml(BorderColor)
        End Function

        Public Function GetColorScheme() As String
            Return IIf(ColorScheme = PluginColorSchemes.Light, "light", "dark")
        End Function
    End Class

    ''' <summary>
    ''' Parametros de configuracion del control LikeButton
    ''' </summary>
    ''' <remarks></remarks>
    Public Class LikeButtonSettings
        Public Property HRef As String = ""
        Public Property ShowSend As Boolean = True
        Public Property Width As Integer = 450
        Public Property ShowFaces As Boolean = True
        Public Property Layout As LikeButtonLayouts = LikeButtonLayouts.Standar

        Public Function GetSend() As String
            Return IIf(ShowSend = True, "true", "false")
        End Function

        Public Function GetFaces() As String
            Return IIf(ShowFaces = True, "true", "false")
        End Function
    End Class

    ''' <summary>
    ''' Espacios de nombre Xml requeridos por los controles Facebook
    ''' </summary>
    ''' <remarks></remarks>
    Public Class XmlNamespaces

        ''' <summary>
        ''' xmlns:fb="http://ogp.me/ns/fb#"
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property FbNamespace As String
            Get
                Return "xmlns:fb=""http://ogp.me/ns/fb#"""
            End Get
        End Property

        ''' <summary>
        ''' xmlns:og="http://ogp.me/ns#"
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Shared ReadOnly Property OgNamespace As String
            Get
                Return "xmlns:og=""http://ogp.me/ns#"""
            End Get
        End Property

    End Class

    ''' <summary>
    ''' Diseños del boton "Me Gusta"
    ''' </summary>
    ''' <remarks></remarks>
    Public Enum LikeButtonLayouts
        Standar
        ButtonCount
        BoxCount
    End Enum

    ''' <summary>
    ''' Esquemas de color
    ''' </summary>
    ''' <remarks></remarks>
    Public Enum PluginColorSchemes
        Light
        Dark
    End Enum

    ''' <summary>
    ''' Fuentes del control Facebook
    ''' </summary>
    ''' <remarks></remarks>
    Public Enum PluginFonts
        Arial
        LucidaGrande
        SegoeUI
        Tahoma
        TrebuchetMS
        Verdana
    End Enum

    ''' <summary>
    ''' Rutinas de traduccion de valores
    ''' </summary>
    ''' <remarks></remarks>
    Friend Class Translator

        ''' <summary>
        ''' Convierte una fuente en su nombre equivalente para etiquetas HTML
        ''' </summary>
        ''' <param name="SelectedFont">Fuente a traducir</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Friend Shared Function GetFontName(ByVal SelectedFont As PluginFonts) As String
            Select Case SelectedFont
                Case PluginFonts.Arial : Return "arial"
                Case PluginFonts.LucidaGrande : Return "lucida grande"
                Case PluginFonts.SegoeUI : Return "segoe ui"
                Case PluginFonts.Tahoma : Return "tahoma"
                Case PluginFonts.TrebuchetMS : Return "trebuchet ms"
                Case PluginFonts.Verdana : Return "verdana"
                Case Else : Return "arial"
            End Select
        End Function

    End Class

End Namespace